import {
  MaterialProperty,
  Material,
  Color,
  DeveloperError
} from '@cesiumjs';

import PolylineColorGlowMaterial from "../Shaders/Materials/PolylineColorGlowMaterial.js";

const G3xMaterial = (0, function() {
  return {
    Material,
    init() {
      /**
       * Gets the name of the polyline glow material.
       * @type {String}
       * @readonly
       */
      Material.PolylineColorGlowType = "PolylineColorGlow";
      Material._materialCache.addMaterial(Material.PolylineColorGlowType, {
        fabric: {
          type: Material.PolylineColorGlowType,
          uniforms: {
            color: new Color(0.0, 0.5, 1.0, 1.0),
            glowColor: new Color(1.0, 0.0, 0.0, 0.5),
            glowPower: 0.25,
            taperPower: 1.0,
          },
          source: PolylineColorGlowMaterial,
        },
        translucent: true,
      });
    }
  };
})();

export default G3xMaterial;
